﻿<h2>Contacts</h2>

@if (Roles.IsUserInRole(User.Identity.Name, "Admin")){
	<div id="editable" contenteditable="true">
		<p>@(new HtmlString((string)ViewData["contacts"]))</p>
	</div>
	<script type="text/javascript">
		CKEDITOR.disableAutoInline = true;
		CKEDITOR.inline("editable", {
			on: {
				blur: function (event) {
					var data = { contacts: event.editor.getData() };
					$.post("Contacts", data, null, "html");
				}
			}
		});
	</script>
}
else{
	<p>@(new HtmlString((string)ViewData["contacts"]))</p>
}